extends ./index.jade

block content
	.rightSide
		.panel.panel-default
			.panel-heading.togglePanel 
				a(href='#') 管理员
			.panel-body
				table(id='managerList').table.table-hover

		ul(id='schoolList').schoolList
	
	.modal.fade(id='upgrateModal')

	script(id='managerTmpl' type="text/x-dot-template")
		|{{~it:manager:index}}
		tr
			td {{=manager.name}}
		
		|{{~}}
	script(id='schoolTmpl' type="text/x-dot-template")
		|{{~it:school:index}}
		li
			.panel.panel-default
				.panel-heading.togglePanel
					a(href='#') {{=school.name}}
				.panel-body
					table.table.table-hover.container-fluid
						tbody
							|{{~school.tangzhus:tangzhu:i}}
							tr
								td.col-xs-8 {{=tangzhu.name}}
								td.col-xs
									a(data-id="{{=tangzhu.id}}").btn.btn-primary.upgrateTangzhu 修改权限
									a(data-id="{{=tangzhu.id}}").btn.btn-danger.deleteTangzhu 删除堂主
							|{{~}}
		|{{~}}
	script(id='upgrateTmpl' type="text/x-dot-template")
		.modal-dialog
			.modal-content
				.modal-body
					h4 是否将{{=it.name}}提升为管理员?
				.modal-footer
					a(data-id="{{=it.id}}" onclick="upgrate({{=it.id}})").btn.btn-success 确定
					a(data-dismiss='modal').btn.btn-default 取消
	script(src='/js/lib/require.js' data-main='/js/auth_manage')
	